<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>index</title>
    <link rel="stylesheet" href="css/Demo02.css"><!--外部样式表-->
    <script language="JavaScript" src="js/index.js"></script>
</head>
<body>
<div id="div_container">
<div id="div1">
    <!--添加键-->
    <div id="div2">
        <a th:href="@{/add.html}">添加</a>
    </div>
    <!--查询键-->
    <form th:action="@{/index}" method="post" >
        请输入查询关键字:
        <input type="text" name="keyword"/><input type="submit" value="查询">
    </form>
    <!--表格主体-->
        <table id="tbl1" >
            <tr th:if="${#lists.isEmpty(session.userlist)}">
                <td colspan="4">空</td>
            </tr>
            <tr  th:unless="${#lists.isEmpty(session.userlist)}"
                th:each="role:${session.userlist}">
            <td th:text="${role.id}" >1</td>
            <td> <a th:text="${role.name}" th:href="@{/genshin(fid=${role.id})}">魈</a></td>
            <td th:text="${role.age}">3000</td>
            <td> <img src="imgs/胡桃.jpg" width="60" height="30" th:onclick="|delrole(${role.id})|"></td>
            </tr>
        </table>
    <div style="width:60%;margin-left:20%;border:0px solid red;padding-top:4px;" class="center">
    <input type="button" value="首  页" class="btn" th:onclick="|page(1)|" th:disabled="${session.pageNo==1}"/>
    <input type="button" value="上一页" class="btn" th:onclick="|page(${session.pageNo-1})|" th:disabled="${session.pageNo==1}"/>
    <input type="button" value="下一页" class="btn" th:onclick="|page(${session.pageNo+1})|" th:disabled="${session.pageNo==session.pageCount}"/>
    <input type="button" value="尾  页" class="btn" th:onclick="|page(${session.pageCount})|" th:disabled="${session.pageNo==session.pageCount}"/>
</div>
</div>
</div>
</body>
</html>